﻿using MelonLoader.Utils;
using MelonLoader;

[assembly: MelonGame("DoubleCross", "Sultan's Game")]
[assembly: MelonInfo(typeof(SultanModLoader.Main), "SultanModLoader", "1.1.1", "critipan")]
namespace SultanModLoader
{
    public class Main : MelonPlugin
    {
        static readonly string TMP_DIR = Path.Combine(MelonEnvironment.ModsDirectory, "tmp");


        public override void OnEarlyInitializeMelon()
        {
            PrintModLoaderInfo();
            PrintDirs();
            //AssetsTool.TryLoadMods();
            ModLoader.TryLoadMods();

        }

        private void PrintModLoaderInfo()
        {
            MelonLogger.WriteLine();
            MelonLogger.Msg("欢迎使用ModLoader，作者:critipan");
            MelonLogger.Msg("OnEarlyInitializeMelon");
        }
        private void PrintDirs()
        {
            MelonLogger.WriteLine();
            MelonLogger.Msg("游戏根目录: " + MelonEnvironment.GameRootDirectory);
            MelonLogger.Msg("游戏数据目录: " + MelonEnvironment.UnityGameDataDirectory);
            MelonLogger.Msg("StreamingAssets目录: " + ModLoader.ASSETS_DIR);

            MelonLogger.Msg("当前工作目录: " + Environment.CurrentDirectory);
            MelonLogger.Msg("MelonLoader根目录: " + MelonEnvironment.MelonLoaderDirectory);
            MelonLogger.Msg("Mods目录: " + MelonEnvironment.ModsDirectory);

            MelonLogger.Msg("StreamingAssets缓存目录" + ModLoader.BAK_DIR);
        }

    }
}
